package SmartHome.entity;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

public class UserInfo {

    private final SimpleIntegerProperty userId;
    private final SimpleStringProperty userName;
    private final SimpleStringProperty UserPassword;
    private final SimpleStringProperty UserPhoneNumber;
    private final SimpleIntegerProperty FId;
    int uState;


    public UserInfo(Integer userId, String userName, String UserPassword,
                    String UserPhoneNumber, Integer FId, int uState) {
        this.userId = new SimpleIntegerProperty(userId);
        this.userName = new SimpleStringProperty(userName);
        this.UserPassword = new SimpleStringProperty(UserPassword);
        this.UserPhoneNumber = new SimpleStringProperty(UserPhoneNumber);
        this.FId = new SimpleIntegerProperty(FId);
        this.uState= uState;
    }
    public int getUserId() {
        return userId.get();
    }
    public SimpleIntegerProperty UserIdProperty(){return userId;}
    public void setId(int userId) {
        this.userId.set(userId);
    }

    public String getUserName() {
        return userName.get();
    }
    public SimpleStringProperty UserNameProperty(){return userName;}
    public void setUserName(String userName) {
        this.userName.set(userName);
    }

    public String getPassword() {
        return UserPassword.get();
    }
    public SimpleStringProperty PasswordProperty(){return UserPassword;}
    public void setPassword(String UserPassword) {
        this.UserPassword.set(UserPassword);
    }

    public String getUserPhoneNumber() {
        return UserPhoneNumber.get();
    }
    public SimpleStringProperty UserPhoneNumberProperty(){return UserPhoneNumber;}
    public void setUserPhoneNumber(String UserPhoneNumber) {
        this.UserPhoneNumber.set(UserPhoneNumber);
    }

    public int getFId() {
        return FId.get();
    }
    public SimpleIntegerProperty FIdProperty(){return FId;}
    public void setFId(int FId) {
        this.FId.set(FId);
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "userId=" + userId +
                ", username='" + userName + '\'' +
                ", UserPassword='" + UserPassword + '\'' +
                ", UserPhoneNumber='" + UserPhoneNumber + '\'' +
                ", FId='" + FId + '\'' +
                ", uState='" + uState + '\''+
                '}';
    }
}
